package com.atguigu.gmall.mapper;

import com.atguigu.gmall.bean.InteractionComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface InteractionCMapper {
    @Select("select course_name,\n" +
            "       avg_starts,\n" +
            "       user_count,\n" +
            "       concat(comment_count/user_count*100,'%') comment_rate\n" +
            "from dws_interaction_course_comment_window partition par#{date}")
    List<InteractionComment> selectInterCommentList(Integer date);
}
